Merge "Fix stuck exiting windows" into pi-dev