Cast sub pages (ContactPage), to get proper output in JSON.