diff --git a/billard/templates/billard/index.html b/billard/templates/billard/index.html
index eb6b40e..398718e 100644
--- a/billard/templates/billard/index.html
+++ b/billard/templates/billard/index.html
@@ -33,8 +33,10 @@ $(document).ready(function() {
function refresh_page() {
$('#desk_data').load('#');
$('#modal-wrapper').load('{% url 'accountmodal' %}', function() {
- window.clearInterval(interval);
- $('#accountsmodal').modal('show');
+ if ( $('#accountsmodal').length ) {
+ window.clearInterval(interval);
+ $('#accountsmodal').modal('show');
+ }
});
}