Sonar: small improvements