Fixed issue with null referrer