first thing is did you bench bleed the master cylinder before you installed it. If not that could be your main problem. When installing a new master cylinder you must bench bleed it first. What that means is to fill the fluid tank with brake fluid and then use a small metal rod (a phillips screwdriver works well too) to depress the plunger on the back where it will mount to the brake booster and that will fill the master cylinder with fluid. Do this until no more bubbles go into the fluid tank when you depress the plunger.