fixed database_check regression in the API