Added smart redirection.