There are several things that can cause this:
First make sure that the rubber grommet on the end of the shaft got postioned correctly when you reassembled the motors. If it's sitting outside the case it will interfere with proper operation of the limt switches. The following link has pictures of this and other good info on a rebuild.
https://www.fiero.nl/forum/Forum2/HTML/045256.html
Second the motor rotor needs to be able to slide up and forth to be able to open the switches. If you didn't oil or grease the bushing on the rotor before reassembly this could also be problem.
Third it can be dirty contacts on the relays. If there is a voltage drop across the relay then the motor doesn't operate at full power and won't have enough torque at the end of travel to shift the rotor to open the limit switch. The solution is to clean the contacts or replace the relays.
If the limit switch doesn't open at the end of travel the motor will cycle on and off on the thermal overlead switch. After a motor is reinstalled watch it closely for a couple of minutes. If you see it intermittently click on and off, the limit switch hasn't opened and it cycling on the thermal overload.