fixed redirection issues