Fix bug with AST output