Fix duplicated last elem