now it does not produce error if we cancel on the opening dialog