diff --git a/cod_bof/cod_bof.module b/cod_bof/cod_bof.module
index 87d2fd6..42b06a3 100755
--- a/cod_bof/cod_bof.module
+++ b/cod_bof/cod_bof.module
@@ -88,7 +88,7 @@ function cod_bof_module_implements_alter(&$implementations, $hook) {
 }
 
 function _cod_bof_get_gid($time_slot_id) {
-  return db_query('SELECT g.gid FROM og_membership g, field_data_field_slot_types_time_slot t
+  return db_query('SELECT g.gid FROM {og_membership} g, field_data_field_slot_types_time_slot t
         WHERE g.etid = t.field_slot_types_time_slot_target_id AND t.entity_id = :timeslotid', array(':timeslotid' => $time_slot_id))->fetchField();
 }
 
