fix #69, we can now pass stuffs in onEnd + tests added
Merge pull request #77 from EragonJ/bug/69

fix #69, we can now pass stuffs in onEnd + tests added