Fixing error on post method