Fix old database conversion.
Implement direct checking.