fix major issues on sonar