Fixed bug in sampling beta: was summing row-wise not column-wise