fix bug in stack collector, misnamed variable