fixing issues with the new data stream representation