Global variables unexpectedly escape out to their HTML codes