bug fix for updating