Fix for deleting loaded studies during data importing.