workaround with Java 6&7 issues