Fixed crash when saving project