Added more readable event detection.
Signed-off-by: Zhou Chang <achang.zhou@gmail.com>