fixed a bug in the Replace abstract syntax