Fixed bugs with drag and drop