Fixed a bug with EventHandler