Fixed more issues found by findbugs
Merge pull request #503 from dcapwell/morefindbugissues

Fixed more issues found by findbugs