Fixed crash on CMD-opening of file while another file is opened