fixing stream example