bug fixing on drag and drop