Fixed extraFromAST method.