Fixed a bug in the Collector.