coverity bug fixes
coverity bugs