fixed: variable error

I guess `window` is not "right" variable here.