DB: Fix some errors