Bug fix for redraw()