fix framebuffer bug