Fixed a bug in discrete-diagonal structure update.