Fixed bugs/recommendations found from FindBugs