Take the housing to a bike-shop and tell them you need it replaced. Ask them to cut it at the same length and include new ferrules (end-caps). And buy a new gear-cable. The following cut & paste are instructions for fixing a front-derailleur that it causing problems. The links will explain cables and all as well:
____________________________________________________________________________________________________ _________________
Take the cable off the FD. Now install it from scratch as per Park Tool Repair:
http://www.parktool.com/repair/readhowto.asp?id=75
And BicycleTutor:
http://bicycletutor.com/adjust-front-derailer/
When you have it properly trimmed and are ready for the cable - a new one wouldn't hurt - you want to pull the cable taut - not too tight, taut. Then apply 48 to 60 inch-pounds to the pinch-bolt. Then put it through it's paces.
It's always easier and faster to install a FD from square-one, than it is to make adjustments with it already attached. This tends to fix one thing - while throwing another out of kilter. Start fresh. You'll get it.
Adding an inline barrel-adjuster can solve many problems with the cable coming loose - or being too tight.
Barrel Adjusters:
http://www.biketoolsetc.com/index.cg...rrel-Adjusters