Sounds to me like you might be Reinforcing the Exact behavior you're trying to stop
These little guys are smart
They very quickly know ... when I do this ... I'm going to get a treat
If your dog is barking and then COMES to you ... ignore him
Or else he's going to think Hey I bark and I get a reward .... NICE