Fixing of small bugs according to FindBug report
Merge pull request #2817 from PhantomYdn/fix-findbugs-issues

Fixing of bugs according to FindBug report