fix api.put to set hash correctly