fixed bug with magnet dragging