fixed another error in collect()