Fixed java 1.8 compatibility