Fixed bug where creating and closing a project would throw an error