updated for compatibility with Java 8 update 20.