fix crash when sigma is too large