Fixed coverity defects