order of params is wrong and `$root` is duplicated