Fix redrawing of shapes