fix loss_type