Fix another batch of coverity issues