Fixed one half of the new Texture API bugs
Fixed the other bug in the new Texture API