Fix wsgi post bug and fix tests issues