Fixed Sonar's issues