0.9.x nodaemon backport (rebase of #144 to 0.9.x branch)
Merge pull request #271 from deniszh/0.9.x_nodaemon

0.9.x nodaemon backport (rebase of #144 to 0.9.x branch)