Removing hanging onStep and onEnd events