fixed bug in sensorID assignment: used iterator value instead of actual sensor ID from GEAR