Fix to Issue #1

Hi Dan, I send a fix to reference issue. (and my first one pull request :-) )