Sigmoid bug fixed