Fix opening files in empty window on windows