Fix for Java < 8