fixed event binding/unbinding