fix some coverity complaints