Fixed issue of cookie var not being set on initial page load after installing script