Eliminate impossible connections