fix bug in label creation