fix bug in table manager