fixes to nthRoot and tests