fixing some redirect issues