fixing the initial nil case for xd()