Help with a stepson situation.

My step son has had an attitude problem lately and has been so ungrateful. He is only 10 and was hoping we wouldn't run into this until later on but here it is. My husband always gets mad at me when I talk to him about parenting and how he needs to up his game a little more before it gets really bad. He tells me he shouldn't have to deal with it when he comes home after working all week...way to communicate honey...well I was venting to my mother about it while caring for my baby because I thought my stepson was outside. He wasn't...he heard everything through the baby monitor, including a cut about his mom being a poor example to him and his brother. When I figured this out, I went in the living room like I was fine and he looked upset. When he went outside to play he hugged me and told me he loved me which has not been him lately so I know he overheard everything and I feel horrible. I told my husband what had happened and he asked me if I said anything bad. I really couldn't remember anything except the cut about his mom so I'm not even sure of what all I said. I had let so much build up and after my husband was unwilling to communicate I had to vent to my mother. Now I feel horrible. Any advice?