Fixed genTextureAtlas bug.