If the milk solids & ghee have tuned brownish black, the ghee is burnt. You can avoid this by keeping an eye on the ghee during the last couple of minutes when it's getting ready. Turn off the heat as soon as the milk solids have started turning light red, and the ghee is light golden in color. Ghee will cook for a few minutes even after you turn off the heat, and turn a deeper shade of gold. But do not wait for it to turn deep gold before you turn off the heat, else it will burn in the few additional minutes it keeps cooking after you turn off the heat.