Fixed Some bugs with the Event Handler.