Fixed bug when there is no post data