Fixed another issues reported by Scrutinizer