Fix issue and optimize update method