fix java 8 compatibility