fixes border issue for masking synapses