fixed mistake in add operation