Weight underflow check should guard against -math.huge, not math.huge (typo)