update logic bug