fix crash related to saving project