fix some java8 issues