Fixed bug in sending request to server