Flatten result of scan