TRQ-2691 Fixed some coverity issues.