fixed redirect issues