Fixed Mealy with help from BERG