Fix handleEvent