Java fixes