fixed bug in logisitic function 2nd derivative