fix counter script