Fixed WaitEvent()

Signed-off-by: Jacky Boen <aqiank@gmail.com>