Minor optimization for flips
Merge branch 'jmobs2' of https://github.com/vladpetric/ntest into jmobs2