fix crash on some pages