Fixed some bugs after latest "random" wiring changes.