fix bug for adding noise if only one variable is specified