Fix go vet errors

Close #6269
This one is scary,will have to verify what happens