Fix some traceback when restarting schema

Change-Id: I64f1c2eadb84115c82a361080c1cf51d1424a20b
Merge "Fix some traceback when restarting schema"