fixed a few more warnings from coverity