fix for counter issue