fix bugs
Merge dev into dev_xue