Fixes for Coverity issues

Includes a fix for a compiler warning