fixed findbugs and javac warnings