fixed referer function
Merge pull request #30 from CheriPai/master

fixed referer function