Fixed mistake in replace