Took assignment to s.window out of Init()