Fix some trivial coverity issues