add workaround for compiler bug in jdk9