Fixed a unlikely issue discovered by coverity scan.