fix issue reported by Coverity.