Do not override thetas if sum is less or equals to `0`

Closes #4390