Fix W32 bug with input and window closing