Fix the contact id saving issue