Bind close event.