removed trailing \ in setDb method, which was causing that "get_class($db) == $class" fails, even tho it should be true