Fix issues reported by scrutinizer (continued)