SONARPY-2 Avoid failure in unexpected case