Fixing bug with updating.