Adding leaf compensation