- Removed zero-divide errors in case of weights containing zeros.