Fixed some issues accoring Sonar report