fix for Java