fix SQL query i broke that led to broken redirects

fixes: https://drupal.org/node/2118061