fix the milti-page bug