Fixed bug with PUT/POST methods