make sure the game draws correctly when resizing the window