#23 Fixed WaitEvent/SetEvent error.