Fixes based on FindBugs report