Fix of JVM 6 related bug and enhancement of 2 other corner cases.