redirect loop fixed