porting over bugfix for new windows