Fix workaround for Java VM bug