updated and removed some bugs from findbugs