Fixed few coverity defects