Fix move_to_root functionality which Fixes #117 and Fixes #90