improved multiple page range handling