ID counter fix