various import bug fixes