Fix order to replace