Fixing stream data reading