Fix some issues found in findBugs
Merge pull request #35 from zanata/findBugfixes

Fix some issues found in findBugs