remove 16.7ms delay and add an exception handler for win32