Pet: fixed the DB table detection (now it really tries to detect table instead of just "return false").