fixing lots of layout quirks