avoid redrawing when unnecessary