partly revert last commit, fixed infinite updating