fix patches reported by scrutinizer
Merge branch 'patch'