Check the completion of the SCG restoration
Fix some bugs