Changed algorithm of download photos (for faster)