diff --git a/media_theplatform_mpx.module b/media_theplatform_mpx.module
index 28b0999..2af2a3b 100644
--- a/media_theplatform_mpx.module
+++ b/media_theplatform_mpx.module
@@ -1255,13 +1255,19 @@ function media_theplatform_mpx_get_player_iframe_url(array $variables) {
     $wrapper = file_stream_wrapper_get_instance_by_uri($variables['file']->uri);
     $parts = $wrapper->get_parameters();
     $variables['guid'] = $parts['mpx_id'];
-    $variables += db_query("SELECT COALESCE(mpxv.player_id, mpxa.default_player) AS player_id, mpxa.account_id, mpxa.account_pid FROM {mpx_video} mpxv INNER JOIN {mpx_accounts} mpxa ON mpxv.parent_account = mpxa.id WHERE fid = :fid", array(':fid' => $variables['file']->fid))->fetchAssoc();
+    $account_data = db_query("SELECT COALESCE(mpxv.player_id, mpxa.default_player) AS player_id, mpxa.account_id, mpxa.account_pid FROM {mpx_video} mpxv INNER JOIN {mpx_accounts} mpxa ON mpxv.parent_account = mpxa.id WHERE fid = :fid", array(':fid' => $variables['file']->fid))->fetchAssoc();
+    if ($account_data) {
+      $variables += $account_data;
+    }
   }
 
   // If a manual guid value was provided, fetch the player_id and account_id
   // values.
-  if (!empty($variables['guid'])) {
-    $variables += db_query("SELECT COALESCE(mpxv.player_id, mpxa.default_player) AS player_id, mpxa.account_id, mpxa.account_pid FROM {mpx_video} mpxv INNER JOIN {mpx_accounts} mpxa ON mpxv.parent_account = mpxa.id WHERE guid = :guid", array(':guid' => $variables['guid']))->fetchAssoc();
+  if (!empty($variables['guid']) && empty($variables['account_id'])) {
+    $account_data = db_query("SELECT COALESCE(mpxv.player_id, mpxa.default_player) AS player_id, mpxa.account_id, mpxa.account_pid FROM {mpx_video} mpxv INNER JOIN {mpx_accounts} mpxa ON mpxv.parent_account = mpxa.id WHERE guid = :guid", array(':guid' => $variables['guid']))->fetchAssoc();
+    if (is_array($account_data)) {
+      $variables += $account_data;
+    }
   }
 
   // Ensure the player_pid value is set if possible.
