Fix minor issues reported by Coverity scan