Fix cleanup when last listener removed
Merge pull request #1 from leakybkt/master

Fix cleanup when last listener removed