fixed a stackoverflow when 2 pages are referencing each other