Fix bad replacement