Close GH-614: added dispose event. fixes #613.