Fix bug with bind/unbind global events