fix covarity defects;