BUGFIX PollEvent/WaitEvent