Fix bug in get_unique