Swap the two motor wires on the capacitor. If that does not fix the problem, the capacitor itself may be bad. If it turns correctly one time and reverse the next in random order then it's even more likely the bad capacitor (especially considering you just put in a new motor) .
I am assuming you put the fan blades back the right side up - it's possible that the blades are just installed facing the wrong way.