added autopause when the window doesn't have focus