While you're working with cording, some endings can come unraveled. End that by putting a tiny drop of super glue on the end of the cording that you are working with and smash it together, working it into the fibers at the ends of the cording. Get the glue off of your fingers with fingernail polish remover with acetone dabbed onto a cotton ball. You could also try the product "Fray Check", but super glue is cheaper, stronger and longer lasting.
A less messy method would be to use tape (scotch tape or masking tape or even that blue painter's tape). The fabric store that I buy from uses tape for all trims that fray.