gh-451
Fixed database checks