updated for Coverity scan