Fixed a leak in pairWithId