Further global variable fixes
Fix bad reference to window element in modal, causeing backdrop not to show