post_request() function fix