fixed x and y coordinates issue