Fix magic number in dense matrix