fixed some errors found with go vet.