Fix updating visibility while changing threshold