fixed the bug with the namespace applying to the window variable