fixes: assorted issues spotted by go vet
Merge pull request #610 from jonboulle/vet

fixes: assorted issues spotted by go vet