Fix CodeDBHelper.

Add db.close to fix sync error.