fix table import and output bug