fixed bugs with roots