undo optimizations