Fixed NPE happening when one cancels import at some phase.