data isn't needed until the end of the page.  also fix error