correcting coverity problem