Fix Bug4: change the controlling signals of counter