wrong code for optimizer patch