fix Getting nth element