Fix table resize bug