fixed some x,y != y,x bugs in fenced()