fixed bug involving global variables not getting set correctly, making strings not display in html