Fixed bug with invalid identifier of contact (which led to errors during update of contacts).