fixed a small bug in calculating recursive domain names