Properly reference scope of dbservice variable