Fix redirect issue