Fixed the bug with the framerate reduction on screen resize.