fixed an issue where the first generation of a page results in a crash because objects can't be encoded as JSON