Trash Compactor

The compactor performs as it should except when it finishes the cycle the motor will not stop running and it starts thumping. I replaced the Top Limit Directional switch but that did not work. If you open the drawer it stops and when you close the drawer it stays stopped. If you push the pedal it will run through the cycle as stated.