Fixed a couple of Coverity scan warnings.