Fix glithes in the material theme