fixed redirect loop 2