Fixed a bug. Post request was not handled the right way