clean up coverity errors