Fix code that triggers go vet errors