Fixed wrong index