fix upsert call