fixed bug where invalid post edit redirects to wrong view