fix redirect loop for ie/mobile