Fix the redirect method