Was the pan still on the heat when you put the butter in? Rushing is bad, but the sauce might have been too hot. Take it off the burner and let it cool for a bit. Then add cold butter in small pieces while stirring. The butter will melt into the sauce instead of breaking apart. That extra minute off the heat makes all the difference.