Bugfix forgot to check for undefined referer.