Ref fix
Merge pull request #1521 from jjettenn/master

Bug fix