getting rid of layout glitches