fix the ID range bug