fixed an upsert bug