adjust page and handle 404 error