Get rid of some jumpiness when leaving the window