     let dimensionForDraggedButton = self.draggedButtonDimension()
 
     let firstButton = firstTool.button
-    let firstButtonMargin = self.draggedOnBarButton == firstButton ? dimensionForDraggedButton : 0
+    let firstButtonMargin = self.draggedOnToolIdx == 0 ? dimensionForDraggedButton : 0
     switch self.location {
     case .top:
       self.layoutConstraints.append(contentsOf: [

  override func draggingUpdated(_ sender: NSDraggingInfo) -> NSDragOperation {
    let loc = self.convert(sender.draggingLocation(), from: nil)

    let currentDraggedOnButton = self.buttonFrames
      .reduce(nil) { (result, entry) -> WorkspaceToolButton? in
        if result != nil {
          return result
        }

        if entry.value.contains(loc) {
          if self.isTool(entry.key, beingDragged: sender) {
            return nil
          }

          return entry.key.button
        }

        return nil
    }

    if currentDraggedOnButton == self.draggedOnBarButton {
      return .move
    }

    self.draggedOnBarButton = currentDraggedOnButton
    self.relayout()
    return .move
  }

  fileprivate var layoutConstraints = [NSLayoutConstraint]()

  fileprivate var isDragOngoing = false
  fileprivate var draggedOnToolIdx: Int?
  fileprivate var buttonFrames: [CGRect] = []

  required init?(coder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
