Fixed closed-loop speed mode issue and reseting the encoder count.