Some tiny bugs, docs and coverity issues