Fixed "this" being referenced to module instead of window.