Fix some coverity complaints.