fixed a bug in gl texture binding