fixed bug with traits