fix callback issue when we have a gap in IDs