Better duplicates handling in gen, fix runner