Convert map to filter and remove some logs.