fix crash bug on custom page.