Fixing error on post data retrieval