Fixed compile error for JDK 8