fix blunder - wrap the index before fetching the element.