Fixed type bug in AST