fixed bug in replace() skipping the root node. fixed a bug in Expression:clone().