bug fix periodic update sometimes stopping