I agree with both previous comments. But I'd like to add that some dogs take a little more training than others. My Labrador Maya is a great dog and she mostly behaves very well. But when she gets excited, she can be difficult to control. I often have to re-train her on certain things like leash walking and public manners. This dog re-training tactic is called "going back to kindergarten". Maya knows how to walk properly on a leash and she knows not to jump on or lick people (she doesn't jump on anyone in the family or our friends who know her well), but sometimes she is so excited that she momentarily forgets her training. (Someone once laughingly called Maya's issues GLS or Goofy Lab Syndrome.)
My other dog, Pierson, on the other-hand, is a very quick learner. Once he learns something, that's it, he's got it down. There hasn't been any "going back to kindergarten" with him. And he is a very goofy dog too.
Don't give up. Keep working with him and take him "back to kindergarten" whenever needed. Dog training takes TPPC, that is time, patience, positive reinforcement, and consistency... some dogs more than others.