fixed js problem with java8