Fix error with double redirect