Equated x and y into valid index positions