Fix buildMipMapLevel