I agree with Bo... don't give him a treat if you don't
ask for the behavior. Just keep walking and don't stop. Keep your "momentum" going even if he tries to stop, sit or do whatever... just keep a-walkin'.
Jackson does this sometimes when trying to learn a new trick. He will do every trick he knows first just to get that treat and even though he's doing the tricks I've taught him, I didn't ask for them
So he only gets a treat when he does what I want him to do.