Fix import script bugs.