Fixed coverity issues reported