When you say "leaking" what exactly do you mean? Is the water spraying over the top of the basket, or is it just blowing lots of water everywhere when you go to pull the espresso?
Its unlikely that it would be a mechanical fault, as you suggested that you changed the machine. Did you steam the milk then run the coffee? or did you do it the other way around? Is this a shot that youve pulled after the machine sitting idle for a couple of minutes, or is it the same after you attempt multiple pours?
Possible solution? Try purging the system (waiting til you get a stream of water from the showerhead instead of hissy steam) before you put the portafilter on, then run the shot, See what happens then.
Another question to ask is, are you running the Pressurised baskets? if you are, That could cause problems with running a finer grind in order to achieve proper extraction times.
Oh, and more detail on what "course" means when you talk about your grind would be possibly helpful to aid you with your problem