remove duplicate code
fix #206: KeyError when lx download --all