fixed a small bug in texImage2D()