fixing some PMD warnings