Fix for redraw problem