Fix bug in post/put