fixed duplicates in getnext