Fixed a bug of setting wallpaper when all images expired.