quit if page reaches eof