Fixes to Coverity defect 84478 and to 72759 which has reappeared.