Revert changes that broke blocking on windows
Fix modality setting