Ski etiquette help

Hi! I'm still somewhat new to skiing and had a small incident yesterday that I’ve been thinking about. I don’t want to be rude or dangerous on the slopes, so any advice would be much appreciated!

As I was nearing the bottom of a fairly busy and narrow run, I came across a group that was stopped and standing about six across, basically taking up the entire width of the run. I didn’t want to stop and cause more congestion, as there were a few people coming up behind me as well. So, I went between them. It was certainly a tight fit, but I was going slow and didn’t feel that it was dangerous (I tend to be a very cautious person, so i wouldn’t have done that if I felt it was too dangerous). However, after I passed them, one of the men yelled at me because “the gap was not open.”

I feel bad, but I also kind of feel that what I did was okay.

Please let me know if I was in the wrong and what I should’ve done instead. Thank you in advance!