Fixed a problem with non-power of 2 textures.