fixed semantic errors caught by `go vet`.