--fixed bugs in set_start/count