fix the bug 'cant downgrade database from version...'