handleEvent bug