be more cautious with the redirect state