fix bugs in post/put data