The headaches are essentially a withdrawal symptoms. Try decreasing the sugar in smaller steps. If you get a headache, try a taste of fruit or other natural sugar to see if it helps with the pain. Be patient!