fix stupid optimizations
Merge branch 'master' into OutputLimit