Fix for  perserving nested data structure.