Hopefully fixed the counter problem