fixed JDK compatibility issues