fixed framebuffer overflow