fixed sonar code issues