fix bad replace in processAPIImpl