fix render with counter bug