fix error detected by coverity