Fixed minor indexing typo in previous commit. All tests now pass.