Fixing but in sigmoid functions