correction for sequential id retrieval