Fix activation function generation