-Fix state issue with reference
Merge pull request #36 from mrvux/b30

-Fix state issue with reference