Fixed NullPointerException with OpenJDK.