Fixed bug with event.detail