Fixed weird optimization issue