fixed redirection problem