fix java 7 compatibility