new polarity layout
fix textmode layout bugs