fix fanin/fanout and reverse in/out nets