Fix bug for coping with multi page