More Java fixes