correction find-bugs + refactoring