fixed datastream bug