fix broken next update code