Fixes to Coverity defects 83027 and 72714