Make the re-direction work correctly