Fix phase2 removal, p2index points to unique ide and not to array index