Added derivative to activation function.