Fix a Major Sonar violation

Relates #80, #294