fix bug download empty images and count