Bugfix: nullify global window ref