small tweaks to supress coverity warnings