Fix wirting of optocoupler inputs.