fixed invalid redirect