Fixing bug i introduced in n matrix update