Fix to prevent duplication of elements
Changes to improve drag and drop