Fix Reading large metadata documents