fixed event binding issues