solving some sonar reported issues