Fixing some errors found by the FindBugs Eclipse plugin