diff --git a/includes/database/database.inc b/includes/database/database.inc
index b375aa4..227f6ca 100644
--- a/includes/database/database.inc
+++ b/includes/database/database.inc
@@ -322,7 +322,7 @@ abstract class DatabaseConnection extends PDO {
     // Destroy all references to this connection by setting them to NULL.
     // The Statement class attribute only accepts a new value that presents a
     // proper callable, so we reset it to PDOStatement.
-    $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array()));
+    $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatement'));
     $this->schema = NULL;
   }
 
@@ -678,7 +678,11 @@ abstract class DatabaseConnection extends PDO {
       else {
         $this->expandArguments($query, $args);
         $stmt = $this->prepareQuery($query);
-        $stmt->execute($args, $options);
+        if ($stmt instanceof DatabaseStatementInterface) {
+          $stmt->execute($args, $options);
+        } else {
+          $stmt->execute($args);
+        }
       }
 
       // Depending on the type of query we may need to return a different value.
diff --git a/includes/database/mysql/database.inc b/includes/database/mysql/database.inc
index 00d81f4..e3b73fe 100644
--- a/includes/database/mysql/database.inc
+++ b/includes/database/mysql/database.inc
@@ -135,7 +135,7 @@ class DatabaseConnection_mysql extends DatabaseConnection {
     // be a problem in this case. Also, TRUNCATE resets the auto increment
     // counter.
     try {
-      $max_id = $this->query('SELECT MAX(value) FROM {sequences}')->fetchField();
+      $max_id = $this->query('SELECT MAX(value) FROM {sequences}')->fetchColumn(0);
       // We know we are using MySQL here, no need for the slower db_delete().
       $this->query('DELETE FROM {sequences} WHERE value < :value', array(':value' => $max_id));
     }
