bug fix for update