Fixed bug with PUT requests