fixed some bugs that occured while dragging points