bug with wrong root recognition fixed