Fix windows test
Fix windows gui where it could crash in some very rare cases