Projects are properly closed before deletion