fixed problem with maxX and maxY to getField().getX() and .getY()