fix bugs in wp in using restsharp