fixed sonar-found issues that seemed important