Fixes bug in SQLObject::all