Fixed array index issue.