Game Object flies out of screen when dragged

Why is my object flying into the screen when I drag it? It will start off in the correct mouse to world pos correctly, but fly through the screen repeatedly while I hold it to drag. How do I stop making it do that? thanks

function OnMouseDrag(){

var hit: RaycastHit;

var ray = Camera.main.ScreenPointToRay(Input.mousePosition);

    if (Physics.Raycast(ray, hit)){ 
    gameObject.transform.position = hit.point;
}
}

It sounds to me like you want to use a code fragment as follows:

var distance:float = Vector3.Distance(Camera.main.transform.position, gameObject.transform.position);	
gameObject.transform.position = Camera.main.ScreenToWorldPoint(Vector3(Input.mousePosition.x, Input.mousePosition.y, -distance));

It is not clear to me that you want to use Raycasting. Rather, what you want to do is convert a screen coordinate to a world coordinate.