Fix. NPE after the project was closed