Fix error in redirect