Fix for redirect loop.