CHanges ScrollDemo to use right index