Fixing typo on update function