some sonar failsafe fixes