Fixes sonar issues