Fixes for coverity checks.