BF: Avoid a crash when importing files