A Fraction Problem for the Weekend! Enjoy!

A farmer died leaving his 17 horses to his 3 sons.
When his sons opened up the Will it read:
My eldest son should get 1/2 (half) of total horses;
My middle son should be given 1/3rd (one-third) of the total horses;
My youngest son should be given 1/9th (one-ninth) of the total horses.

As it is impossible to divide 17 into half or 17 by 3 or 17 by 9, the three sons started to fight with each other.

So, they decided to go to a farmer’s friend who they considered quite smart, to see if he could work it out for them.

The farmer friend read the Will patiently, after giving due thought, he brought one of his own horses over and added it to the 17. That increased the total to 18 horses.

Now, he divided the horses according to their father’s Will.

Half of 18 = 9. So he gave the eldest son 9 horses.
1/3rd of 18 = 6. So he gave the middle son 6 horses.
1/9th of 18 = 2. So he gave the youngest son 2 horses.
Now add up how many horses they have:

TOTAL IS 17.
Now this leaves one horse over, so the farmer friend takes his horse back to his farm.

HOW IS THIS POSSIBLE????