Added spin and reset. Bug fix