changes to improve overdrawing (which will produce a slightly different UI)