added check to ensure referer is not null when checking local storage
Merge branch 'hotfix/s%'