switched window.page from *mut Page to @mut Page