fixed bug in "pumaAst" function