Fix a DB bug