fixed a bug in collector.go