Fix a bug in the v-rep checking error.
Also stop the motor controller when resetting the v-rep simulation.