fix table redrawing