Fix go vet errors

Close #6269