Well yeah, the script cannot distinguish between
http://yoursite.com and
http://www.yoursite.com. Of course we know its the same site, but script distinguishes them as two different domains. Id say stick to one pattern, either use www all the time or not to use it anywhere in your script. Of course the cheapest way is to have yourself logged into both
http://yoursite.com and
http://www.yoursite.com, a little bit stupid if you ask me but it does work.