changes for better windows handling