Fix redirect issues