diff --git a/.gitignore b/.gitignore
index 3f6f2bef9999988eb392af8140f1b5568cf2a74e..96b27b15cd8ceb79d700f5209aebc9d49332372d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,6 @@ cscope.files
 cscope.out
 tags
 !*.inc
+*.zst
+config.log
+autom4te.cache
diff --git a/PKGBUILD b/PKGBUILD
index 0a4537fbced8cae0ca036829ae71c403fa21414b..ef2513a51db18166fc3cfc60a453755c78b1cfb4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
 # Maintainer: Maël 'Kubat' MARTIN <mael.martin31@gmail.com>
 pkgname=lektor
-pkgver=mk7.1036.462cf03
+pkgver=mk7.1044.1d6ed7d
 pkgrel=1
 pkgdesc="The lektor kara player, from the Bakaclub"
 arch=(x86_64 i686)
diff --git a/src/database/disk.sql b/src/database/disk.sql
index d1e356f6bb2ac14244e3931dcbd3e0510d65aed9..691a028ac17d7ee836c196089c249f5c8f711484 100644
--- a/src/database/disk.sql
+++ b/src/database/disk.sql
@@ -77,6 +77,13 @@ CREATE TABLE IF NOT EXISTS queue
   , priority INTEGER NOT NULL DEFAULT 1 CHECK(priority > 0 AND priority < 6)
   );
 
+-- Temporary queue table used when reordering the queue (for inserts)
+CREATE TABLE IF NOT EXISTS queue_tmp
+   ( position INTEGER PRIMARY KEY AUTOINCREMENT CHECK(position > 0)
+   , kara_id INTEGER
+   , priority INTEGER NOT NULL DEFAULT 1 CHECK(priority > 0 AND priority < 6)
+   );
+
 
 -- The user table
 -- Used for the [password {passwd}] MPD command. The documentation can be found
diff --git a/src/database/queue.c b/src/database/queue.c
index 9762414cc190ac529b71ceaa860eea0cff1c9277..be228d71c64b1660e3dbab2cf33e5a0a02f36934 100644
--- a/src/database/queue.c
+++ b/src/database/queue.c
@@ -132,12 +132,6 @@ __queue_reorder(volatile sqlite3 *db)
     "(SELECT CASE WHEN (SELECT current FROM queue_state) IS NULL THEN 0"    \
     " ELSE (SELECT current FROM queue_state) END AS val LIMIT 1)"
     static const char *SQL_REORDER =
-        /* Create temporary tables */
-        "CREATE TEMPORARY TABLE queue_tmp IF NOT EXISTS"
-        " ( position INTEGER PRIMARY KEY AUTOINCREMENT CHECK(position > 0)"
-        " , kara_id INTEGER"
-        " , priority INTEGER NOT NULL DEFAULT 1 CHECK(priority > 0 AND priority < 6)"
-        " );"
         /* Separate karas that are after the current one */
         "INSERT INTO queue_tmp (kara_id, priority)"
         " SELECT kara_id, priority FROM queue WHERE position > " CURRENT_POS_OR_0