Prevent some redirect loops