Fixed bug found by Cole Wunderlich. RowMeans need a matrix so the peakrange matrix must not be coersed to a vector when there is only one peak to expand.