Fix code according to FindBugs static analysis.