applied noviewprev.diff, fix.diff and unusedflags.diff