fix redirect issue