fixed bug with xy