Allow to break out of subscribe loop
Break out of subscribe loop

* Modified @isage pull request slightly for OCD reasons.
* Fixed an old memory leak in subscribe.

Related to #493
Merge branch 'feature/break_sub_loop' into develop