Fixed a bug with stop listening action.

Huge and fantastic pull request. :)