fix table folding