Fixed a bug in the post() method
Several changes