Bug fixes to drag n drop