Improve Xy data detection. Fix #21