Fix some pmd bugs