Retirement tax questions

The excess contribution actually generated a loss. So when I removed the excess contribution the amount that was removed was the original contribution minus the loss.