That is a nice fix for this. I guess your server just does not set this variable the way that the script thinks it should, or it is suppressed for security reasons. Normally this value should contain the script that referred you to the page, but if it is not available setting it to the current page seems like it will work. Let us know if you have any other problems.