fixed infinite recursion, added customizable options in pageConfig