fixed logic erros
Merge branch 'master' of https://github.com/jngrt/meshenger
 fixed logic errors