resultIndex now starts at 1 instead of 0 (closes #1161)