bug fixes due to FindBugs