Windows is buggy, adding additional error handling.