fixing event handler definition

oops, needed to pull the command out of the event