Hotfix/event manager for resource and controller

* Fixed Resource and Controller event manager.
* Fixed detaching RestParametersListener.

Please submit this as a separate pull request.