fixed some more bugs in type check, adjusted main to support dump-symtab