Fixes encoding issue in xm_clone_script.