Removed the bug with the index number