fix bug in input event