Fixed a mistake in new code