Why is the Svg associated with D outside D, but the one associated with R inside R ? 
I think you should put it inside D.