diff --git a/fb.install b/fb.install
index b43c404..c715f17 100644
--- a/fb.install
+++ b/fb.install
@@ -156,9 +156,14 @@ function fb_enable() {
   }
 }
 
+/**
+ * Remove fb variables.
+ */
 function fb_uninstall() {
   // Variables prefixed with double underbar to avoid conflicts with other modules named fb_something.
-  db_query("DELETE FROM {variable} WHERE name LIKE 'fb__%'");
+  db_delete('variable')
+    ->condition('name', db_like('fb_') . '%', 'LIKE')
+    ->execute();
 }
 
 /**
