Try to fix some issues found by Scrutinizer-CI
Merge pull request #1667 from stloyd/bugfix/ci_issues

Try to fix some issues found by Scrutinizer-CI