Overlapping problem

OK, I have this:

I want it so the legs do not overlap. Here is part of the code for the legs:

How might I achieve this? Any advice is appreciated.