fixed issue #25 reordered the stop event so its called after everything ...

...is cleaned up