fixed coverity null deref