Fix Error during redirect