added global scope's check to html template