Java-AIinterface fixes