Revert update code to the same as in 4.6.5