Fixes some PMD warnings