fix a problem with \'events\' property is an array
bind element to handler