Fix issue when compiling with jdk 8