Fixed closing project

Closing of a project closes a window