fixed some problems with the drag and drop