fix nullpointer crash bug when load some pages