Modify to update dimension when redraw - #702