Avoid unnecessary redraw