fix a bug in generate multinormal distribution