Updated for the latest XD version