Vacuum motor problem?

IMG_1193.JPGIMG_1198.JPG

Vacuum motor problem today.  I was having a problem with one of the motors not working.  I opened the top and tapped the motor and it started working again.  But the motor started sparking.  So I just replaced the motor.  I am not really sure if I could still use the sparking motor though.