Fix bugs in cunstructing symbol table