Fixed Sonar-detected issues. Minor :-)