Make sure argument to dmvnorm is vector.