fixed the errors from the last commit in the index action of post