Fix some errors reported by test case.
DB dump.