fixed transposition of x, y coordinates