Changes to have redirect work