Finish filling the matrix