WP-4587 fix update function