Added code for sent spin and stop.