Fix passing of pages with workaround, because type check with generic does not work.