fixed a few things in page_lookup