fixed bug for incorrect reset and start