renamed the close event to on_close (#59)