fixed gl state error