trying to fix bug in http put request.