fix #5 for traits
Merge pull request #8 from pjordaan/issue-5

fix #5 for traits