fixed random X Y issue