Fixed optimizations error