Check correct argument for pane

The first argument is the jQuery event, not the pane being removed