Fix collect() behavior.