bug fixed in sigmoid function