disabling some optimizations because of undefined behavior