One more thing, is this a Shimano fd? If so, attaching the cable to the fixing bolt the right way is essential. Look at the bolt and you will see a small tab to its left. The cable must route OUTSIDE of this tab and then over the top of the fixing bolt.
If you route the cable between the tab and the bolt, the actuation ratio changes enough that the shifting will not index properly.