FIxed some minor sonar warnings