Fixed several bug and drag and drop improvement.