make screen capture work correctly on windows