Fix styling glitches in the material theme