Fixed inefficient mealy stream