Fixed issues reported by coverity

12459, 12460, 12461