public Position makeValid() {
		if (isValid())
			return this;
		// 
		int newBtX = Math.max(getBX(), 0);
		int newBtY = Math.max(getBY(), 0);
		Map map;
		if (JNIBWAPI.getInstance() != null)
			map = JNIBWAPI.getInstance().getMap();
		else
			map = null;
		if (map == null) {
			newBtX = Math.min(newBtX, 256 - 1);
			newBtY = Math.min(newBtY, 256 - 1);
		} else {
			newBtX = Math.min(newBtX, map.getSize().getBX() - 1);
			newBtY = Math.min(newBtY, map.getSize().getBY() - 1);
		}
		return new Position(newBtX, newBtY, PosType.BUILD);
	}