fixed mipmap generation