Fixed crash when reader database is downgraded

Fixes #505