fix counter when doing comapct