delete middle legs with the parent, fix potential bug with substituting middle for the leg
warn for failed export