bug fix: max update condition