Fixed tiny bugs found by findbugs
Merge pull request #123 from myui/hotfixes

Fixed tiny bugs found by findbugs