fix bugs in import books script