fixed compilation problems with java 8.