diff --git a/briar-core/src/net/sf/briar/db/JdbcDatabase.java b/briar-core/src/net/sf/briar/db/JdbcDatabase.java
index ced2977185165a4502f864308bef13cc36c862be..a4ebf2ff73b99b6dc26d03ee6d0c319594cb4fba 100644
--- a/briar-core/src/net/sf/briar/db/JdbcDatabase.java
+++ b/briar-core/src/net/sf/briar/db/JdbcDatabase.java
@@ -591,8 +591,12 @@ abstract class JdbcDatabase implements Database<Connection> {
 					ps.setBytes(2, id);
 					ps.addBatch();
 				}
-				affected = ps.executeUpdate();
-				if(affected != ids.size()) throw new DbStateException();
+				int[] batchAffected = ps.executeBatch();
+				if(batchAffected.length != ids.size())
+					throw new DbStateException();
+				for(int i = 0; i < batchAffected.length; i++) {
+					if(batchAffected[i] != 1) throw new DbStateException();
+				}
 				ps.close();
 			}
 			// Create a connection time row