fix some bugs from FindBug