Fix flags in perform_redirection