Test and fix 1,2 inout's logic function