+ fixes issues found by coverity scan