Fix a Major Sonar violation

Relates #80, #294
Merge remote-tracking branch 'origin/master'