Fix freezing on ST2/3 on Windows, ST3 on OS X