fixed some problems with the ids