fixed the bug with drag and drop