fixed implementation of end_value and end_index_minor. Replaced "num_nonzeros( m )" by "end_value( m ) - begin_value( m )".