bugfix
added event handler