Fixed problems with latest simplification changes.
Merge branch 'fix-simplification' into fix-crlf