Windows fixes and resume fixes