Fix FSMWrite