Fixed minor sonar issues