Only used in the 'redraw' function. We should move this there then.