Fix issue with redirect