Fix invalid and infinite redirect for unsupported browsers