diff --git a/index.html b/index.html
index caae8a6..4ee6994 100644
--- a/index.html
+++ b/index.html
@@ -592,7 +592,7 @@
function setConnection(newConnection) {
// Disconnect from existing presentation, if not attempting to reconnect
if (connection && connection != newConnection && connection.state != 'closed') {
- connection.onclosed = undefined;
+ connection.onclose = undefined;
connection.close();
}