lobby server: Added a ranged for loop check in the sqlite wrapper class.