added page text range check