Merge pull request #2 from pylebecq/master

Fixed some flaws in StatefulTrait.