fixed error in datastream sleep