fixed so that prev_id gets recorded properly whether click on an ellipse or network node