fix some bug in textureManager