fix post request handling