Correct a few issues reported by scrutinizer