Fixes initial max range to check max_photos instead of blindly assuming >=20.