fixed some more issues found by Coverity