Always furl the headsail before taking the mainsail down.
The best way to furl the headsail is not to turn into wind but to turn downwind so that the wind is aft of the beam (not dead downwind).
Let the mainsheet out so that the mainsail is shadowing the headsail. This makes the job of furling the headsail much easier and the sail will wrap up neatly without flogging.
Hold your course and release the headsail sheet as you take in the furling line. Never! force the furling line or use the winch to furl. If jammed investigate the cause, either the sheet is too tight, the furling line has a knot in it, or one of the ropes has a tangle at the drum.
Coil the furling line up and secure it so is cannot fall over the side.