diff --git a/masquerade.module b/masquerade.module
index 2de2a20..cf1a120 100644
--- a/masquerade.module
+++ b/masquerade.module
@@ -763,7 +763,7 @@ function masquerade_switch_user($uid) {
     'masquerade as user';
 
   // Check to see if we need admin permission.
-  $results = db_query('SELECT TRUE FROM {masquerade_users} WHERE uid_from = :uid_from AND uid_to = :uid_to', array(
+  $results = db_query_range('SELECT 1 FROM {masquerade_users} WHERE uid_from = :uid_from AND uid_to = :uid_to', 0, 1, array(
     ':uid_from' => $user->uid,
     ':uid_to' => $new_user->uid,
   ));
