Fix minor issues reported by scrutinizer