fixed the count in the delayed call with another var