No longer throws an error when unregistering events.

Fixes #42