Handle redrawing properly