small fix in toAST