Fixed wrong call when the record already exists