Fix POST request and tests