Fix several FindBugs warnings