Fix some minor coverity issues