bug fix on window resize watcher