Fixed unregistering whilst in a loop.
Merge branch 'release/0.2.2'