fixing findbugs violations regarding locks