fixed bug in sending request