Added custom event handler.