fixed tie and counter bug