Fixed issue when the referer was null
Merge pull request #221 from ianwallen/Fix_Issue_174

Fixed issue when the referer was null