Fixed deadlock in notifications
Added ctrl-c handler