fixed bug regarding cubemaps