Fixed terrible bug in diagonalUpdate