fixed a root detection problem