fix some drag and drop bugs