Fixed Sonar-detected issues. Minor :-)
(cherry picked from commit 9aa866c)