Updated to use old_contactid where available