add protection for log(0)
Merge branch 'master' of github.com:marcelrf/shepherd