Fixes #4528: change query to check database status