Fix unassigned variable use

collector is unassigned variable.