Fixed  bug for PUT request