fixed bug with extra trailing slash on redirect.