Fixed some PMD warnings