Modified tanh, gives no NaN now.