anchor.diff:    P := gCursor.Cell;
     if gCursor.Tag1 = 255 then
     begin
  -    obj := gMySpectator.HitTestCursor(True);
  -    if obj is TKMUnit then
  -      gHands.RemAnyUnit(TKMUnit(obj).Position);
  +    entity := gMySpectator.HitTestCursor(True);
  +    // Delete unit by using precise HitTest result from gCursor (rather than Position)
  +    if entity.IsUnit then
  +      gHands.RemAnyUnit(entity.Position);
     end
     else
     if gTerrain.CanPlaceUnit(P, TKMUnitType(gCursor.Tag1)) then
  
positive.code: procedure TKMMapEditor.ProceedUnitsCursorMode;
  var
    P: TKMPoint;
    obj: TObject;
    formation: TKMFormation;
    GT: TKMGroupType;
    dir: TKMDirection;
  
negative.code:   removeTxID := -1;
  
    try
      case entity.EntityType of
        etUnit: begin
                  // Delete unit by using precise HitTest result from gCursor (rather than Position)
                  gHands.RemAnyUnit(entity.Position);
                  if not aEraseAll then Exit;
                end;
        etHouse:begin
                  gHands.RemAnyHouse(P);
                  if not aEraseAll then Exit;
                end;
      end;
  
      isCorn := gTerrain.TileIsCornField(P);
  