SONAR-5209 Handle corner cases