fixed a small merge issue with update method