fix bug caught by go vet