Code cleanup.
Workaround for redraw bug.