fix label code generation