fixed error when sending post request