some fixes regarding bidirectional switches