fix, addTrait invoked two times