Fixed bugs around nested data structure.