Anti alias problem using nodes

Is there a way to get rid of the white borders on objects when you use nodes?

I often use map value and a colour ramp to achieve dof and colour effects but am getting white borders around objects at the front of the picture when when using an OSA of 16, can I get rid of the white border?