fixed invalid $trait reference in parse traits; functions now work again