fix readEvent handler