Get the object IDs correctly.