Fixed issues as a result of FindBugs run.