Solve the display bug of mainPage