fixed sonar bug complex statements