Fixes issues compiling with jdk8