Fixes issues found by scrutinizer-ci
Merge pull request #769 from nsendetzky/master

Fixes issues found by scrutinizer-ci